package com.iwayin.core.utils;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class TouxiangModel {
	private static final String FIRSTIMAGE ="http://freebao.com/images/touxiang/001.jpg" ;
	private static final String SECONDIMAGE="http://freebao.com/images/touxiang/002.jpg" ;
	private static final String THIRDIMAGE="http://freebao.com/images/touxiang/003.jpg" ;
	private static final String FOURTHIMAGE="http://freebao.com/images/touxiang/004.jpg" ;
	private static final String FIFTHIMAGE="http://freebao.com/images/touxiang/005.jpg" ;
	private static final String SIXTHIMAGE="http://freebao.com/images/touxiang/006.jpg" ;
	private static final String SEVENTHIMAGE="http://freebao.com/images/touxiang/007.jpg" ;
	private static final String EIGHTHIMAGE="http://freebao.com/images/touxiang/008.jpg" ;
	private static final String NINETHIMAGE="http://freebao.com/images/touxiang/009.jpg" ;
	private static List<String> images =new ArrayList<String>();
	static
	{
		images.add(FIRSTIMAGE);
		images.add(SECONDIMAGE);
		images.add(THIRDIMAGE);
		images.add(FOURTHIMAGE);
		images.add(FIFTHIMAGE);
		images.add(SIXTHIMAGE);
		images.add(SEVENTHIMAGE);
		images.add(EIGHTHIMAGE);
		images.add(NINETHIMAGE);
	}
	public static String getImage()
	{
		Random random = new Random();
		int result = random.nextInt(8+1);//取小于或等于max的一个随机数
		return images.get(result);
		
	}
}
